package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;


public class BooksList {
    List<Book> booksList;

    BooksList(){
        this.booksList = new ArrayList<Book>();
        Init();
    }

    private List Init(){
        booksList.add(new Book("book0"));
        booksList.add(new Book("book1"));
        booksList.add(new Book("book2"));
        booksList.add(new Book("book3"));
        booksList.add(new Book("book4"));
        booksList.add(new Book("book5"));
        booksList.add(new Book("book6"));
        return booksList;
    }

    public void printBooksList(){
        for(int i=0;i< booksList.size();i++) {
            if(booksList.get(i).isAvailable())
            System.out.println(booksList.get(i).getName());
        }
    }
}